home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 59 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: lyra.csx.cam.ac.uk!nmm1
  2. From: nmm1@cus.cam.ac.uk (Nick Maclaren)
  3. Newsgroups: comp.std.c
  4. Subject: Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?
  5. Date: 9 Jan 1996 11:39:50 GMT
  6. Organization: University of Cambridge, England
  7. Message-ID: <4ctk66$57j@lyra.csx.cam.ac.uk>
  8. References: <sc3f9vb6gk.fsf@lns101.lns.cornell.edu>  <1996Jan5.094122.16151@sq.com>  <vyzd98ug7w4.fsf@lamothe.informatik.uni-dortmund.de> <tuent98zl4.fsf@nemo.bedford.waii.com>
  9. NNTP-Posting-Host: ursa.cus.cam.ac.uk
  10.  
  11. In article <tuent98zl4.fsf@nemo.bedford.waii.com>, gsez020@nemo.bedford.waii.com (Pete Forman) writes:
  12. |> >>>>> "Andreas" == Andreas Schwab <schwab@lamothe.informatik.uni-dortmund.de> writes:
  13. |> >>>>> "Mark" == Mark Brader <msb@sq.com> writes:
  14. |> 
  15. |>     Mark>    #if LONG_MAX * DBL_EPSILON > 1
  16. |> 
  17. |>     Andreas> This doesn't work as floating point numbers aren't
  18. |>     Andreas> allowed in #if expressions.
  19. |> 
  20. |> Try changing to something like
  21. |> 
  22. |>     #if LONG_MAX >> DBL_MANT_DIG > 1
  23.  
  24. Don't bother - the 'constants' in <float.h> aren't!  This is a specific
  25. exclusion to make life easier for systems with separate floating-point
  26. processors, and makes <float.h> almost useless for numerical analysts.
  27.  
  28. I tried to get this imbecility (and it IS an imbecility) fixed, but I
  29. failed.  So any portable library of mathematical functions has to define
  30. its own system-dependent constants, and can use <float.h> only for
  31. comparison :-(
  32.  
  33.  
  34. Nick Maclaren,
  35. University of Cambridge Computer Laboratory,
  36. New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
  37. Email:  nmm1@cam.ac.uk
  38. Tel.:  +44 1223 334761    Fax:  +44 1223 334679
  39.